﻿using System.Reflection;
using System.Windows.Forms;

namespace Goooodbye.Presentation.WinFormsApp.Utils
{
    public class MessageBoxUtil
    {
        private static readonly string caption = Assembly.GetExecutingAssembly().GetName().Name;

        public static DialogResult Confirm(string text)
        {
            return MessageBox.Show(text, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        public static DialogResult Success(string text)
        {
            return MessageBox.Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
        }

        public static DialogResult Fail(IWin32Window owner, string text, string title)
        {
            return MessageBox.Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.Stop);
        }

        public static DialogResult Warning(IWin32Window owner, string text, string title)
        {
            return MessageBox.Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
    }
}
